<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 
        层叠顺序 z-index 默认值 auto 值越大，顺序越靠上  可以取负值
            注意：
                想让z-index生效，当前标签必须要有定位属性(relative absolute fixed)
     -->
     <style>
         .box{
             width:200px;
             height:200px; background:red;
             position: absolute;
             z-index: -1;
         }
         .box1{
             width:200px;
             height:200px; background:blue;
             position: absolute;
             z-index: -2;
         }
     </style>
</head>
<body>
  <div class="box"></div>  
  <div class="box1"></div>
</body>
</html>